<template>
  <div class="body-bg">
    <van-nav-bar>
      <template #left>
        <van-icon
          name="arrow-left"
          style="font-size: 20px"
          @click="$router.back()"
        />
      </template>
      <template #title>
        <h3>设置</h3>
      </template>
    </van-nav-bar>
    <van-cell
      title="账号与安全"
      is-link
      style="margin: 10px 0; font-size: 17px"
      to="/index/setone"
    />
    <van-cell
      title="滴滴亲亲卡"
      is-link
      style="margin-top: 10px; font-size: 17px"
      to="/index/settwo"
    />
    <van-cell
      title="切换语言"
      is-link
      style="font-size: 17px"
      to="/index/setthree"
    />
    <van-cell-group>
      <van-switch-cell
        v-model="checked"
        title="关怀模式"
        style="margin-top: 10px; font-size: 17px"
      />
    </van-cell-group>

    <van-cell
      title="常用地址"
      is-link
      style="margin-top: 10px; font-size: 17px"
      to="/index/setfour"
    />
    <van-cell
      title="行程安全"
      is-link
      style="font-size: 17px"
      to="/index/setfive"
    />
    <van-cell-group>
      <van-switch-cell
        v-model="checked2"
        title="实时情况"
        label="打开后可显示实时状态"
        style="margin-top: 10px; font-size: 17px"
      />
    </van-cell-group>
    <van-cell-group>
      <van-switch-cell
        v-model="checked3"
        title="音效设置"
        label="打开后可为您提示订单状态"
        style="font-size: 17px"
      />
    </van-cell-group>
    <van-cell-group>
      <van-switch-cell
        v-model="checked4"
        title="锁屏查看接驾信息"
        label="打开后锁屏时可以看到接驾信息"
        style="font-size: 17px"
      />
    </van-cell-group>
    <van-cell
      title="清空缓存"
      :value="downLoad"
      style="margin-top: 10px; font-size: 17px"
      is-link
      @click="change"
    />
    <van-cell
      title="版本更新"
      value="V6.0.18_1209"
      style="margin-top: 10px; font-size: 17px"
      is-link
      @click="tan"
    />
    <van-cell title="法律条款与平台规则" style="font-size: 17px" is-link />
    <van-cell title="用户指南" style="font-size: 17px" is-link />
    <van-nav-bar title="退出登录" style="margin-top: 12px; font-size: 20px" />
  </div>
</template>

<script>
import { Dialog } from "vant";
export default {
  data() {
    return {
      checked: true,
      checked2: false,
      checked3: false,
      checked4: false,
      downLoad: "21MB",
    };
  },
  methods: {
    change() {
      this.downLoad = "0MB";
    },
    tan() {
      Dialog.alert({
        message: "当前已是最新版本",
      }).then(() => {
        // on close
      });
    },
  },
};
</script>

<style  lang="scss" scoped>
.body-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow-y: auto;
  background: #f0f0f0;
}
.chack {
  /* width: 100%; */
  display: flex;
  justify-content: space-between;
}
</style>